{{/*
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.

Copyright (c) 2021-present Kaleidos Ventures SL
*/}}

{{ define "main" }}

<!-- Why Taiga -->
<section class="section-sm">
  <div class="container">
    <div class="row justify-content-center">
      <div class="col-10 featured-post">
        {{ with .Site.GetPage "/why-taiga" }}
        <article class="card featured-post">
          <div class="row no-gutters align-items-center">
            <div class="col-md-5">
              <a href="{{ .Permalink }}">
              {{ if .Params.Thumbnail }}
              <img src="{{ .Params.Thumbnail | absURL }}" class="card-img" alt="{{ .Title | markdownify }}">
              {{ else }}
              <img src="{{ .Params.Image | absURL }}" class="card-img" alt="{{ .Title | markdownify }}">
              {{ end }}
              </a>
            </div>
            <div class="col-md-6 offset-md-1">
              <div class="card-body">
                <a href="{{ .Permalink }}"
                  class="h1 font-weight-bold d-block text-dark mb-4 card-title">{{ .Title | markdownify }}</a>
                <p class="card-text">{{.Summary}}...</p>
              </div>
            </div>
          </div>
        </article>
        {{ end }}
      </div>
    </div>
  </div>
</section>
<!-- /why taiga -->

<!-- Getting started, 30min setup and extend taiga-->
<section>
  <div class="container">
    <div class="row">
      {{ with .Site.GetPage "/getting-started" }}
      <div class="col-lg-4 small-post-border">
        <article class="media">
          <div class="recent-post-thumb mr-3" style="background-image: url('{{ .Params.thumbnail_home | absURL }}');"></div>
          <div class="media-body">
            <div class="mb-3 post-meta">
            </div>
            <a href="{{ .Permalink }}" class="h5 d-block mb-3">{{ .Title | markdownify }}</a>
            <a href="{{ .Permalink }}" class="btn btn-outline-primary">read more</a>
          </div>
        </article>
      </div>
      {{ end }}
      {{ with .Site.GetPage "/30min-setup" }}
      <div class="col-lg-4 small-post-border">
        <article class="media">
          <div class="recent-post-thumb mr-3" style="background-image: url('{{ .Params.thumbnail_home | absURL }}');"></div>
          <div class="media-body">
            <div class="mb-3 post-meta">
            </div>
            <a href="{{ .Permalink }}" class="h5 d-block mb-3">{{ .Title | markdownify }}</a>
            <a href="{{ .Permalink }}" class="btn btn-outline-primary">read more</a>
          </div>
        </article>
      </div>
      {{ end }}
      {{ with .Site.GetPage "/how-to-extend-taiga" }}
      <div class="col-lg-4 small-post-border">
        <article class="media">
          <div class="recent-post-thumb mr-3" style="background-image: url('{{ .Params.thumbnail_home | absURL }}');"></div>
          <div class="media-body">
            <div class="mb-3 post-meta">
            </div>
            <a href="{{ .Permalink }}" class="h5 d-block mb-3">{{ .Title | markdownify }}</a>
            <a href="{{ .Permalink }}" class="btn btn-outline-primary">read more</a>
          </div>
        </article>
      </div>
      {{ end }}
    </div>
  </div>
</section>
<!-- /getting started, 30min setup and extend taiga -->

<!-- Featured posts -->
<section class="section pb-0">
  <div class="container">
    <div class="row">
      <div class="col-lg-8 mb-5 mb-lg-0">
        <div class="row">
          {{ range sort (where .Site.RegularPages "Type" "featured") ".Params.order_home" }}
          <div class="col-md-6 mb-4">
            <article class="card">
              <a href="{{ .Permalink }}">
              {{ if .Params.Thumbnail }}
              <img src="{{ .Params.Thumbnail | absURL }}" class="card-img-top" alt="{{ .Title | markdownify }}">
              {{ else }}
              <img src="{{ .Params.Image | absURL }}" class="card-img-top" alt="{{ .Title | markdownify }}">
              {{ end }}
              </a>
              <div class="card-body px-0">
                {{ range .Params.Categories }}
                <a href="{{ `categories/` | relLangURL }}{{ . | urlize | lower }}"
                  class="text-primary">{{ . | title | humanize }}</a>
                {{ end }}
                <a href="{{ .Permalink }}" class="h5 d-block my-3">{{ .Title | markdownify }}</a>
                <div class="mb-3 post-meta">
                </div>
                <p class="card-text">{{ .Summary }}</p>
                <a href="{{ .Permalink }}" class="btn btn-outline-primary">read more</a>
              </div>
            </article>
          </div>
          {{ end }}
        </div>
      </div>
      <!-- faqs sidebar -->
      {{ partial "sidebar.html" . }}
      <!-- /faqs sidebar -->
    </div>
  </div>
</section>
<!-- /main features -->

{{ end }}
